import org.junit.After;
import org.junit.Test;

import static org.junit.Assert.assertEquals;

public class CalculatorTest {
    private Calculator calculator=new Calculator();
    @After
    public void tearDown() {
        calculator.clear();
    }

    @Test
    public void TestAdd() {

        calculator.add(3);
        assertEquals(3,calculator.getResult());
    }

    @Test
    public void TestSubstract() {

        calculator.subtract(3);
        assertEquals(-3,calculator.getResult());
    }
}
